home *** CD-ROM | disk | FTP | other *** search
/ Quick PC 61 / Quick PC 61.iso / I386 / NETFX.CAB / admin.chm / html / vs70.js < prev    next >
Encoding:
JavaScript  |  2003-02-21  |  35.3 KB  |  1,282 lines

  1. // VERSION 9231
  2. // This script works best with IE 6.x
  3.  
  4. //************************** LOCALIZATION VARIABLES ***************************
  5.  
  6. // Variables for Feedback links
  7. var L_FeedbackLink_TEXT = "Send feedback to Visual Studio";
  8. var L_MessageLink_TEXT = "Microsoft Knowledgebase Link";
  9. var L_MailToLink_TEXT = "Send feedback to Visual Studio";
  10.  
  11. // Variables for the running head buttons
  12. var L_SeeAlso_TEXT = "See Also";
  13. var L_Requirements_TEXT = "Requirements";
  14. var L_QuickInfo_TEXT = "QuickInfo";
  15. var L_FilterTip_TEXT = "Language Filter";    // tooltip for language button
  16. var L_Language_TEXT = "Language";        // heading for menu of programming languages
  17. var L_ShowAll_TEXT = "Show All";        // label for 'show all languages' menu item
  18.  
  19. // Variable for Animation text
  20. var L_Animation_Text = "Click to animate";
  21.  
  22. // Variables for Expand-Collapse functions
  23. var L_ExpandAll_TEXT = "Expand All";
  24. var L_CollapseAll_TEXT = "Collapse All";
  25. var L_ExColl_TEXT = "Click to Expand or Collapse";
  26.  
  27. //*************************** END LOCALIZATION ********************************
  28.  
  29. // defines the running head popup box
  30. var L_PopUpBoxStyle_Style = "WIDTH:200PX; PADDING:5px 7px 7px 7px; BACKGROUND-COLOR:#FFFFCC; BORDER:SOLID 1 #999999; VISIBILITY:HIDDEN; POSITION:ABSOLUTE; TOP:0PX; LEFT:0PX; Z-INDEX:2;";
  31.  
  32. //**** Do not localize the following lines, they allow for bilingual files ****
  33.  
  34. var US_See_Also = "See Also";
  35. var US_Requirements = "Requirements";
  36. var US_QuickInfo = "QuickInfo"
  37.  
  38. //***ScriptSettings
  39. var bRefTips = "True"        //Show RefTips
  40.  
  41. //***************************** END VARIABLES *********************************
  42.  
  43. var popOpen, theImg, theDiv, e;
  44. var imgArray = new Array(new Image(), new Image(), new Image(), new Image(), new Image());
  45.  
  46. // ****************************************************************************
  47. // *                           Common code                                    *
  48. // ****************************************************************************
  49.  
  50. // Check for <meta Name="ScriptSettings" RefTips="False">
  51.     if (bRefTips=="True"){
  52.         var mColl = document.all.tags("MeTa");
  53.         for (i=0; i<mColl.length; i++){
  54.             if (mColl(i).name.toUpperCase()=="SCRIPTSETTINGS"){
  55.                 if (mColl(i).RefTips.toUpperCase()=="FALSE") bRefTips = "False";
  56.             }
  57.         }
  58.     }
  59. var ie4 = false;
  60. var advanced = false;
  61. var curLang = null;
  62. var showAll = true;
  63. var cook = null;
  64. var baseUrl = document.scripts[document.scripts.length - 1].src.replace(/[^\/\\]+.js/, "");
  65. var popupDIV = "<DIV ID='popUpWindow' STYLE='"+L_PopUpBoxStyle_Style+"'>" + "</DIV>";
  66.  
  67. if (navigator.appName == "Microsoft Internet Explorer") {
  68.     var ver = navigator.appVersion;
  69.     var v = new Number(ver.substring(0,ver.indexOf(".", 0)));
  70.     if (v >= 4) {
  71.         advanced = true;
  72.         ie4 = true;
  73.  
  74.         // Look for 5.x buried somewhere in the version string.
  75.         var toks = ver.split(/[^0-9.]/);
  76.         if (toks) {
  77.             for (var i = 0; i < toks.length; i++) {
  78.                 var tok = toks[i];
  79.                 if (tok.indexOf(".", 0) > 0) {
  80.                     if (tok >= 5)
  81.                         ie4 = false;
  82.                 }
  83.             }
  84.         }
  85.     }
  86. }
  87. if (advanced)
  88.     window.onload = bodyOnLoad;
  89.     window.onbeforeprint = set_to_print;
  90.     window.onafterprint = reset_form;
  91.  
  92.  
  93. function finishOnLoad(){
  94.     document.onkeypress = ieKey;
  95.     window.onresize = closeIE4;
  96.     document.body.onclick = bodyOnClick;
  97.     //IF THE USER HAS IE4+ THEY WILL BE ABLE TO VIEW POPUP BOXES
  98.     if (advanced){
  99.         document.body.insertAdjacentHTML('beforeEnd', popupDIV);
  100.     }
  101. return;}
  102.  
  103.  
  104. function bodyOnClick(){
  105.     if (advanced) {
  106.         var elem = window.event.srcElement;
  107.         for (; elem; elem = elem.parentElement) {
  108.             if (elem.id == "reftip")
  109.                 return;
  110.         }
  111.         hideTip();
  112.         closeMenu();
  113.         hideSeeAlso();
  114.         resizeBan();
  115.     }
  116. }
  117.  
  118.  
  119. function ieKey(){
  120.     if (window.event.keyCode == 27){
  121.         hideTip();
  122.         closeMenu();
  123.         hideSeeAlso();
  124.         resizeBan();
  125.         closeIE4();
  126.     }
  127. return;}
  128.  
  129.  
  130. function closeIE4(){
  131.     document.all.popUpWindow.style.visibility = "hidden";
  132.     popOpen = false;
  133.     resizeBan();  //also resize the non-scrolling banner
  134. return;}
  135.  
  136.  
  137. function bodyOnLoad(){
  138.     if (advanced) {
  139.         var address = location.href;
  140.         var bookmarkStart = address.indexOf("#")
  141.         // If it has a bookmark, check to see if Language is near A Name
  142.         if (bookmarkStart>-1){
  143.             var bookmark = address.substring(bookmarkStart+1);
  144.             curLang = findLanguage(bookmark);
  145.         }
  146.         else {
  147.             // Check the context window for current language.
  148.             var cLang;
  149.             try{
  150.                 for (i=1; i< window.external.ContextAttributes.Count; i++){
  151.                     if(window.external.ContextAttributes(i).Name.toUpperCase()=="DEVLANG"){
  152.                         var b = window.external.ContextAttributes(i).Values.toArray();
  153.                         cLang = b[0].toUpperCase();
  154.                     }
  155.                 }
  156.             }
  157.             catch(e){}
  158.             if (cLang != null){
  159.                 if (cLang.indexOf("VB")!=-1) curLang = "Visual Basic";
  160.                 if (cLang.indexOf("VC")!=-1) curLang = "C++";
  161.                 if (cLang.indexOf("C#")!=-1) curLang = "C#";
  162.                 if (cLang.indexOf("JSCRIPT")!=-1) curLang = "JScript";
  163.                 if (cLang.indexOf("VBSCRIPT")!=-1) curLang = "VBScript";
  164.             }
  165.  
  166.             if (curLang == null){
  167.                 var l = "";
  168.                 var multipleLang = false;
  169.                 // Check to see what the help filter is set to.
  170.                 try {l = window.external.Help.FilterQuery.toUpperCase();}
  171.                 catch(e){}
  172.                 if (l.indexOf("VB")!=-1){
  173.                     cLang = "Visual Basic";
  174.                     }
  175.                 if (l.indexOf("VC")!=-1){
  176.                     if (cLang!=null) multipleLang = true;
  177.                     cLang = "C++";
  178.                     }
  179.                 if (l.indexOf("C#")!=-1){
  180.                     if (cLang!=null) multipleLang = true;
  181.                     cLang = "C#";
  182.                     }
  183.                 if (l.indexOf("JSCRIPT")!=-1){
  184.                     if (cLang!=null) multipleLang = true;
  185.                     cLang = "JScript";
  186.                     }
  187.                 if (l.indexOf("VBSCRIPT")!=-1){
  188.                     if (cLang!=null) multipleLang = true;
  189.                     cLang = "VBScript";
  190.                     }
  191.                 if (multipleLang==false) curLang = cLang;
  192.                 
  193.             }
  194.         }
  195.         if (curLang != null)
  196.             showAll = false;
  197.         initLangs();
  198.         resizeBan();
  199.         if (bRefTips=="True") initReftips();
  200.         initSeeAlso();
  201.     }
  202. finishOnLoad();
  203.  
  204. }
  205.  
  206.  
  207. function findLanguage(bookmark){
  208. // Find span associated with bookmark
  209.     var found = false
  210.     var aColl = document.all.tags("A");
  211.     for (i=0; i<aColl.length; i++){
  212.         if (aColl(i).name.toUpperCase()==bookmark.toUpperCase()){
  213.             var elem = null
  214.             for(t = 1; t<4; t++){
  215.                 elem = document.all(aColl(i).sourceIndex + t);
  216.                 if (elem.tagName.toUpperCase()=="SPAN")
  217.                     found = true;
  218.                     break;
  219.             }
  220.             break;
  221.         }
  222.     }
  223. //if found, filter language
  224.     if (found){
  225.         var lang = elem.innerText
  226.         return lang.substring(lang.indexOf("[") + 1, lang.indexOf("]"));
  227.     }
  228. }
  229.  
  230.  
  231. // ****************************************************************************
  232. // *                        Language filtering                                *
  233. // ****************************************************************************
  234.  
  235. function initLangs(){
  236.     var hdr = document.all.hdr;
  237.     if (!hdr)
  238.         return;
  239.  
  240.     var langs = new Array;
  241.     var spans = document.all.tags("SPAN");
  242.     if (spans) {
  243.         var iElem = spans.length;
  244.         for (iElem = 0; iElem < spans.length; iElem++) {
  245.             var elem = spans[iElem];
  246.             if (elem.className == "lang") {
  247.  
  248.                 // Update the array of unique language names.
  249.                 var a = elem.innerText.split(",");
  250.                 for (var iTok = 0; iTok < a.length; iTok++) {
  251.                     if (a[iTok]=="[A]"){
  252.                         langs[0]="A";
  253.                         elem.parentElement.outerText="";
  254.                     }
  255.                     var m = a[iTok].match(/([A-Za-z].*[A-Za-z+#0-9])/);
  256.                     if (m) {
  257.                         var iLang = 0;
  258.                         while (iLang < langs.length && langs[iLang] < m[1])
  259.                             iLang++;
  260.                         if (iLang == langs.length || langs[iLang] != m[1]) {
  261.                             var before = langs.slice(0,iLang);
  262.                             var after = langs.slice(iLang);
  263.                             langs = before.concat(m[1]).concat(after);
  264.                         }
  265.                     }
  266.                 }
  267.             }
  268.         }
  269.     }
  270.  
  271.     if (langs.length > 0) {
  272.         var pres = document.all.tags("PRE");
  273.         if (pres) {
  274.             for (var iPre = 0; iPre < pres.length; iPre++)
  275.                 initPreElem(pres[iPre]);
  276.         }
  277.  
  278.         if (curLang == null){
  279.             var obj = document.all.obj_cook;
  280.             if (obj && obj.object) {
  281.                 cook = obj;
  282.                 if (obj.getValue("lang.all") != "1") {
  283.                     var lang = obj.getValue("lang");
  284.                     var c = langs.length;
  285.                     for (var i = 0; i != c; ++i) {
  286.                         if (langs[i] == lang) {
  287.                             curLang = langs[i];
  288.                             showAll = false;
  289.                         }
  290.                     }
  291.                 }
  292.             }
  293.  
  294.         }
  295.  
  296.         var iLim = document.body.all.length;
  297.         var head = null;
  298.         for (var i = 0; i < iLim; i++) {
  299.             var elem = document.body.all[i];
  300.             if (elem.tagName.match(/^(P)|(PRE)|([DOU]L)$/))
  301.                 break;
  302.             if (elem.tagName.match(/^H[1-6]$/)) {
  303.                 head = elem;
  304.                 head.insertAdjacentHTML('beforeEnd', '<SPAN CLASS=ilang></SPAN>');
  305.             }
  306.         }
  307.  
  308.         iLang = 0;
  309.         foundA = false;
  310.         while (iLang != langs.length){
  311.             if (langs[iLang]=="A")
  312.                 foundA = true;
  313.             iLang++;
  314.         }
  315.         if (!foundA)
  316.             // don't language button on
  317.             var td = hdr.insertCell(0);
  318.         if (td) {
  319.             // Add the language button to the button bar.
  320.             td.className = "button1";
  321.             td.onkeyup = ieKey;
  322.             td.onkeypress = langMenu;
  323.             td.onclick = langMenu;
  324.             td.innerHTML = '<IMG id=button1 SRC="' + baseUrl + 'Filter1a.gif' + '" ALT="' +
  325.                 L_FilterTip_TEXT + '" BORDER=0 TABINDEX=0>';
  326.  
  327.             // Add the menu.
  328.             var div = '<DIV ID="lang_menu" CLASS=langMenu onkeypress=ieKey><B>' + L_Language_TEXT + '</B><UL>';
  329.             for (var i = 0; i < langs.length; i++)
  330.                 div += '<LI><A HREF="" ONCLICK="chooseLang(this)">' + langs[i] + '</A><BR>';
  331.             div += '<LI><A HREF="" ONCLICK="chooseAll()">' + L_ShowAll_TEXT + '</A></UL></DIV>';
  332.             try{nsbanner.insertAdjacentHTML('afterEnd', div);}
  333.             catch(e){try{scrbanner.insertAdjacentHTML('afterEnd', div);}catch(e){}}
  334.         }
  335.  
  336.         if (!showAll)
  337.             filterLang();
  338.     }
  339. }
  340.  
  341.  
  342. function initPreElem(pre){
  343.     var htm0 = pre.outerHTML;
  344.  
  345.     var reLang = /<span\b[^>]*class="?lang"?[^>]*>/i;
  346.     var iFirst = -1;
  347.     var iSecond = -1;
  348.  
  349.     iFirst = htm0.search(reLang);
  350.     if (iFirst >= 0) {
  351.         iPos = iFirst + 17;
  352.         iMatch = htm0.substr(iPos).search(reLang);
  353.         if (iMatch >= 0)
  354.             iSecond = iPos + iMatch;
  355.     }
  356.  
  357.     if (iSecond < 0) {
  358.         var htm1 = trimPreElem(htm0);
  359.         if (htm1 != htm0) {
  360.             pre.insertAdjacentHTML('afterEnd', htm1);
  361.             pre.outerHTML = "";
  362.         }
  363.     }
  364.     else {
  365.         var rePairs = /<(\w+)\b[^>]*><\/\1>/gi;
  366.  
  367.         var substr1 = htm0.substring(0,iSecond);
  368.         var tags1 = substr1.replace(/>[^<>]+(<|$)/g, ">$1");
  369.         var open1 = tags1.replace(rePairs, "");
  370.         open1 = open1.replace(rePairs, "");
  371.  
  372.         var substr2 = htm0.substring(iSecond);
  373.         var tags2 = substr2.replace(/>[^<>]+</g, "><");
  374.         var open2 = tags2.replace(rePairs, "");
  375.         open2 = open2.replace(rePairs, "");
  376.  
  377.         pre.insertAdjacentHTML('afterEnd', open1 + substr2);
  378.         pre.insertAdjacentHTML('afterEnd', trimPreElem(substr1 + open2));
  379.         pre.outerHTML = "";
  380.     }    
  381. }
  382.  
  383.  
  384. function trimPreElem(htm){
  385.     return htm.replace(/[ \r\n]*((<\/[BI]>)*)[ \r\n]*<\/PRE>/g, "$1</PRE>").replace(
  386.         /\w*<\/SPAN>\w*((<[BI]>)*)\r\n/g, "\r\n</SPAN>$1"
  387.         );
  388. }
  389.  
  390.  
  391. function getBlock(elem){
  392.     while (elem && elem.tagName.match(/^([BIUA]|(SPAN)|(CODE)|(TD))$/))
  393.         elem = elem.parentElement;
  394.     return elem;
  395. }
  396.  
  397.  
  398. function langMenu(){
  399.     bodyOnClick();
  400.     var btn = window.event.srcElement
  401.     if (btn.id=="button1"){
  402.     btn.src = btn.src.replace("a.gif", "c.gif");}
  403.  
  404.     window.event.returnValue = false;
  405.     window.event.cancelBubble = true;
  406.  
  407.     var div = document.all.lang_menu;
  408.     var lnk = window.event.srcElement;
  409.     if (div && lnk) {
  410.         var x = lnk.offsetLeft + lnk.offsetWidth - div.offsetWidth;
  411.         div.style.pixelLeft = (x < 0) ? 0 : x;
  412.         div.style.pixelTop = lnk.offsetTop + lnk.offsetHeight;
  413.         div.style.visibility = "visible";
  414.     }
  415. }
  416.  
  417.  
  418. function chooseLang(item){
  419.     window.event.returnValue = false;
  420.     window.event.cancelBubble = true;
  421.  
  422.     if (item) {
  423.         closeMenu();
  424.         curLang = item.innerText;
  425.         showAll = false;
  426.     }
  427.  
  428.     if (cook) {
  429.         cook.putValue('lang', curLang);
  430.         cook.putValue('lang.all', '');
  431.     }
  432.  
  433.     filterLang();
  434. }
  435.  
  436.  
  437. function chooseAll(){
  438.     window.event.returnValue = false;
  439.     window.event.cancelBubble = true;
  440.  
  441.     closeMenu();
  442.  
  443.     showAll = true;
  444.     if (cook)
  445.         cook.putValue('lang.all', '1');
  446.  
  447.     unfilterLang();
  448. }
  449.  
  450.  
  451. function closeMenu(){
  452.     var div = document.all.lang_menu;
  453.     if (div && div.style.visibility != "hidden") {
  454.         var lnk = document.activeElement;
  455.         if (lnk && lnk.tagName == "A")
  456.             lnk.blur();
  457.  
  458.         div.style.visibility = "hidden";
  459.     }
  460. }
  461.  
  462.  
  463. function getNext(elem){
  464.     for (var i = elem.sourceIndex + 1; i < document.all.length; i++) {
  465.         var next = document.all[i];
  466.         if (!elem.contains(next))
  467.             return next;
  468.     }
  469.     return null;
  470. }
  471.  
  472.  
  473. function filterMatch(text, name){
  474.     var a = text.split(",");
  475.     for (var iTok = 0; iTok < a.length; iTok++) {
  476.         var m = a[iTok].match(/([A-Za-z].*[A-Za-z+#0-9])/);
  477.         if (m && m[1] == name)
  478.             return true;
  479.     }
  480.     return false;
  481. }
  482.  
  483.  
  484. function topicHeading(head){
  485.     try{var iLim = nstext.children.length;
  486.     Section = nstext;}
  487.     catch(e){try{var iLim = scrtext.children.length;
  488.         Section = scrtext;}
  489.         catch(e){var iLim = document.body.children.length;
  490.         Section = document.body;
  491.         }
  492.     }
  493.     var idxLim = head.sourceIndex;
  494.     for (var i = 0; i < iLim; i++) {
  495.         var elem = Section.children[i];
  496.         if (elem.sourceIndex < idxLim) {
  497.             if (elem.tagName.match(/^(P)|(PRE)|([DOU]L)$/))
  498.                 return false;
  499.         }
  500.         else
  501.             break;
  502.     }
  503.     return true;
  504. }
  505.  
  506.  
  507. function filterLang(){
  508.     var spans = document.all.tags("SPAN");
  509.     for (var i = 0; i < spans.length; i++) {
  510.         var elem = spans[i];
  511.         if (elem.className == "lang") {
  512.             var newVal = filterMatch(elem.innerText, curLang) ? "block" : "none";
  513.             var block = getBlock(elem);
  514.             block.style.display = newVal;
  515.             elem.style.display = "none";
  516.  
  517.             if (block.tagName == "DT") {
  518.                 var next = getNext(block);
  519.                 if (next && next.tagName == "DD")
  520.                     next.style.display = newVal;
  521.             }
  522.             else if (block.tagName == "DIV") {
  523.                 block.className = "filtered2";
  524.             }
  525.             else if (block.tagName.match(/^H[1-6]$/)) {
  526.                 if (topicHeading(block)) {
  527.                     if (newVal != "none") {
  528.                         var tag = null;
  529.                         if (block.children && block.children.length) {
  530.                             tag = block.children[block.children.length - 1];
  531.                             if (tag.className == "ilang") {
  532.                                 tag.innerHTML = (newVal == "block") ?
  533.                                     '  [' + curLang + ']' : "";
  534.                             }
  535.                         }
  536.                     }
  537.                 }
  538.                 else {
  539.                     var next = getNext(block);
  540.                     while (next && !next.tagName.match(/^(H[1-6])$/)) {
  541.                         if (next.tagName =="DIV"){
  542.                             if (next.className.toUpperCase() != "TABLEDIV") break;
  543.                         }
  544.                         next.style.display = newVal;
  545.                         next = getNext(next);
  546.                     }
  547.                 }
  548.             }
  549.         }
  550.         else if (elem.className == "ilang") {
  551.             var block = getBlock(elem);
  552.             if (block.tagName == "H1")
  553.                 elem.innerHTML = '  [' + curLang + ']';
  554.         }
  555.     }
  556.  
  557.     if (ie4) {
  558.         document.body.style.display = "none";
  559.         document.body.style.display = "block";
  560.     }
  561.     resizeBan();
  562. }
  563.  
  564.  
  565. function unfilterLang(name){
  566.     var spans = document.all.tags("SPAN");
  567.     for (var i = 0; i < spans.length; i++) {
  568.         var elem = spans[i];
  569.         if (elem.className == "lang") {
  570.             var block = getBlock(elem);
  571.             block.style.display = "block";
  572.             elem.style.display = "inline";
  573.  
  574.             if (block.tagName == "DT") {
  575.                 var next = getNext(block);
  576.                 if (next && next.tagName == "DD")
  577.                     next.style.display = "block";
  578.             }
  579.             else if (block.tagName == "DIV") {
  580.                 block.className = "filtered";
  581.             }
  582.             else if (block.tagName.match(/^H[1-6]$/)) {
  583.                 if (topicHeading(block)) {
  584.                     var tag = null;
  585.                     if (block.children && block.children.length) {
  586.                         tag = block.children[block.children.length - 1];
  587.                         if (tag && tag.className == "ilang")
  588.                             tag.innerHTML = "";
  589.                     }
  590.                 }
  591.                 else {
  592.                     var next = getNext(block);
  593.                     while (next && !next.tagName.match(/^(H[1-6])$/)) {
  594.                         if (next.tagName =="DIV"){
  595.                             if (next.className.toUpperCase() != "TABLEDIV") break;
  596.                         }
  597.                         next.style.display = "block";
  598.                         next = getNext(next);
  599.                     }
  600.                 }
  601.             }
  602.         }
  603.         else if (elem.className == "ilang") {
  604.             elem.innerHTML = "";
  605.         }
  606.     }
  607.     resizeBan();
  608. }
  609.  
  610.  
  611. // ****************************************************************************
  612. // *                      Reftips (parameter popups)                          *
  613. // ****************************************************************************
  614.  
  615. function initReftips(){
  616.     var DLs = document.all.tags("DL");
  617.     var PREs = document.all.tags("PRE");
  618.     if (DLs && PREs) {
  619.         var iDL = 0;
  620.         var iPRE = 0;
  621.         var iSyntax = -1;
  622.         for (var iPRE = 0; iPRE < PREs.length; iPRE++) {
  623.             if (PREs[iPRE].className == "syntax") {
  624.                 while (iDL < DLs.length && DLs[iDL].sourceIndex < PREs[iPRE].sourceIndex)
  625.                     iDL++;            
  626.                 if (iDL < DLs.length) {
  627.                     initSyntax(PREs[iPRE], DLs[iDL]);
  628.                     iSyntax = iPRE;
  629.                 }
  630.                 else
  631.                     break;
  632.             }
  633.         }
  634.  
  635.         if (iSyntax >= 0) {
  636.             var last = PREs[iSyntax];
  637.             if (last.parentElement.tagName == "DIV") last = last.parentElement;
  638.             last.insertAdjacentHTML('afterEnd','<DIV ID=reftip CLASS=reftip STYLE="position:absolute;visibility:hidden;overflow:visible;"></DIV>');
  639.         }
  640.     }
  641. }
  642.  
  643.  
  644. function initSyntax(pre, dl){
  645.     var strSyn = pre.outerHTML;
  646.     var ichStart = strSyn.indexOf('>', 0) + 1;
  647.     var terms = dl.children.tags("DT");
  648.     if (terms) {
  649.         for (var iTerm = 0; iTerm < terms.length; iTerm++) {
  650.             var words = terms[iTerm].innerText.replace(/\[.+\]/g, " ").replace(/,/g, " ").split(" ");
  651.             var htm = terms[iTerm].innerHTML;
  652.             for (var iWord = 0; iWord < words.length; iWord++) {
  653.                 var word = words[iWord];
  654.  
  655.                 if (word.length > 0 && htm.indexOf(word, 0) < 0)
  656.                     word = word.replace(/:.+/, "");
  657.  
  658.                 if (word.length > 0) {
  659.                     var ichMatch = findTerm(strSyn, ichStart, word);
  660.                     while (ichMatch > 0) {
  661.                         var strTag = '<A HREF="" ONCLICK="showTip(this)" CLASS="synParam">' + word + '</A>';
  662.  
  663.                         strSyn =
  664.                             strSyn.slice(0, ichMatch) +
  665.                             strTag +
  666.                             strSyn.slice(ichMatch + word.length);
  667.  
  668.                         ichMatch = findTerm(strSyn, ichMatch + strTag.length, word);
  669.                     }
  670.                 }
  671.             }
  672.         }
  673.     }
  674.  
  675.     // Replace the syntax block with our modified version.
  676.     pre.outerHTML = strSyn;
  677. }
  678.  
  679.  
  680. function findTerm(strSyn, ichPos, strTerm)
  681. {
  682.     var ichMatch = strSyn.indexOf(strTerm, ichPos);
  683.     while (ichMatch >= 0) {
  684.         var prev = (ichMatch == 0) ? '\0' : strSyn.charAt(ichMatch - 1);
  685.         var next = strSyn.charAt(ichMatch + strTerm.length);
  686.         if (!isalnum(prev) && !isalnum(next) && !isInTag(strSyn, ichMatch)) {
  687.             var ichComment = strSyn.indexOf("/*", ichPos);
  688.             while (ichComment >= 0) {
  689.                 if (ichComment > ichMatch) { 
  690.                     ichComment = -1;
  691.                     break; 
  692.                 }
  693.                 var ichEnd = strSyn.indexOf("*/", ichComment);
  694.                 if (ichEnd < 0 || ichEnd > ichMatch)
  695.                     break;
  696.                 ichComment = strSyn.indexOf("/*", ichEnd);
  697.             }
  698.             if (ichComment < 0) {
  699.                 ichComment = strSyn.indexOf("//", ichPos);
  700.                 var newPos = 0;
  701.                 if (ichComment >= 0) {
  702.                     while (isInTag(strSyn, ichComment)) { //checks to see if the comment is in a tag (and thus part of a URL)
  703.                         newPos = ichComment + 1;
  704.                         ichComment = strSyn.indexOf("//", newPos);
  705.                         if (ichComment < 0) 
  706.                             break;
  707.                     }
  708.                     while (ichComment >= 0) {
  709.                         if (ichComment > ichMatch) {
  710.                             ichComment = -1;
  711.                             break; 
  712.                         }
  713.                         var ichEnd = strSyn.indexOf("\n", ichComment);
  714.                         if (ichEnd < 0 || ichEnd > ichMatch)
  715.                             break;
  716.                         ichComment = strSyn.indexOf("//", ichEnd);
  717.                     }
  718.                 }
  719.             }
  720.             if (ichComment < 0)
  721.                 break;
  722.         }
  723.         ichMatch = strSyn.indexOf(strTerm, ichMatch + strTerm.length);
  724.     }
  725.     return ichMatch;
  726. }
  727.  
  728.  
  729. function isInTag(strHtml, ichPos)
  730. {
  731.     return strHtml.lastIndexOf('<', ichPos) >
  732.         strHtml.lastIndexOf('>', ichPos);
  733. }
  734.  
  735.  
  736. function isalnum(ch){
  737.     return ((ch >= 'a' && ch <= 'z') || (ch >= 'A' && ch <= 'Z') || (ch >= '0' && ch <= '9') || (ch == '_') || (ch == '-'));
  738. }
  739.  
  740.  
  741. function showTip(link){
  742.     bodyOnClick();
  743.     var tip = document.all.reftip;
  744.     if (!tip || !link)
  745.         return;
  746.  
  747.     window.event.returnValue = false;
  748.     window.event.cancelBubble = true;
  749.  
  750.     // Hide the tip if necessary and initialize its size.
  751.     tip.style.visibility = "hidden";
  752.     tip.style.pixelWidth = 260;
  753.     tip.style.pixelHeight = 24;
  754.  
  755.     // Find the link target.
  756.     var term = null;
  757.     var def = null;
  758.     var DLs = document.all.tags("DL");
  759.     for (var iDL = 0; iDL < DLs.length; iDL++) {
  760.         if (DLs[iDL].sourceIndex > link.sourceIndex) {
  761.             var dl = DLs[iDL];
  762.             var iMax = dl.children.length - 1;
  763.             for (var iElem = 0; iElem < iMax; iElem++) {
  764.                 var dt = dl.children[iElem];
  765.                 if (dt.tagName == "DT" && dt.style.display != "none") {
  766.                     if (findTerm(dt.innerText, 0, link.innerText) >= 0) {
  767.                         var dd = dl.children[iElem + 1];
  768.                         if (dd.tagName == "DD") {
  769.                             term = dt;
  770.                             def = dd;
  771.                         }
  772.                         break;
  773.                     }
  774.                 }
  775.             }
  776.             break;
  777.         }
  778.     }
  779.  
  780.     if (def) {
  781.         window.linkElement = link;
  782.         window.linkTarget = term;
  783.         tip.innerHTML = '<DL><DT>' + term.innerHTML + '</DT><DD>' + def.innerHTML + '</DD></DL>';
  784.         window.setTimeout("moveTip()", 0);
  785.     }
  786. }
  787.  
  788.  
  789. function jumpParam(){
  790.     hideTip();
  791.  
  792.     window.linkTarget.scrollIntoView();
  793.     document.body.scrollLeft = 0;
  794.  
  795.     flash(3);
  796. }
  797.  
  798.  
  799. function flash(c){
  800.     window.linkTarget.style.background = (c & 1) ? "#CCCCCC" : "";
  801.     if (c)
  802.         window.setTimeout("flash(" + (c-1) + ")", 200);
  803. }
  804.  
  805.  
  806. function moveTip(){
  807.     var tip = document.all.reftip;
  808.     var link = window.linkElement;
  809.     if (!tip || !link)
  810.         return; //error
  811.  
  812.     var w = tip.offsetWidth;
  813.     var h = tip.offsetHeight;
  814.  
  815.     if (w > tip.style.pixelWidth) {
  816.         tip.style.pixelWidth = w;
  817.         window.setTimeout("moveTip()", 0);
  818.         return;
  819.     }
  820.  
  821.     var maxw = document.body.clientWidth-20;
  822.     var maxh = document.body.clientHeight-200;
  823.  
  824.     if (h > maxh) {
  825.         if (w < maxw) {
  826.             w = w * 3 / 2;
  827.             tip.style.pixelWidth = (w < maxw) ? w : maxw;
  828.             window.setTimeout("moveTip()", 0);
  829.             return;
  830.         }
  831.     }
  832.  
  833.     var x,y;
  834.  
  835.     var linkLeft = link.offsetLeft - document.body.scrollLeft;
  836.     var linkRight = linkLeft + link.offsetWidth;
  837.  
  838.     var linkTop = link.offsetTop - document.body.scrollTop;
  839.     var linkBottom = linkTop + link.offsetHeight;
  840.  
  841.     var cxMin = link.offsetWidth - 24;
  842.     if (cxMin < 16)
  843.         cxMin = 16;
  844.  
  845.     if (linkLeft + cxMin + w <= maxw) {
  846.         x = maxw - w;
  847.         if (x > linkRight + 8)
  848.             x = linkRight + 8;
  849.         y = maxh - h;
  850.         if (y > linkTop)
  851.             y = linkTop;
  852.     }
  853.     else if (linkBottom + h <= maxh) {
  854.         x = maxw - w;
  855.         if (x < 0)
  856.             x = 0;
  857.         y = linkBottom;
  858.     }
  859.     else if (w <= linkRight - cxMin) {
  860.         x = linkLeft - w - 8;
  861.         if (x < 0)
  862.             x = 0;
  863.         y = maxh - h;
  864.         if (y > linkTop)
  865.             y = linkTop;
  866.     }
  867.     else if (h <= linkTop) {
  868.         x = maxw - w;
  869.         if (x < 0)
  870.             x = 0;
  871.         y = linkTop - h;
  872.     }
  873.     else if (w >= maxw) {
  874.         x = 0;
  875.         y = linkBottom;
  876.     }
  877.     else {
  878.         w = w * 3 / 2;
  879.         tip.style.pixelWidth = (w < maxw) ? w : maxw;
  880.         window.setTimeout("moveTip()", 0);
  881.         return;
  882.     }
  883.     
  884.     link.style.background = "#CCCCCC";
  885.     tip.style.pixelLeft = x + document.body.scrollLeft;
  886.     tip.style.pixelTop = y + document.body.scrollTop;
  887.     tip.style.visibility = "visible";
  888. }
  889.  
  890. function hideTip(){
  891.     if (window.linkElement) {
  892.         window.linkElement.style.background = "";
  893.         window.linkElement = null;
  894.     }
  895.  
  896.     var tip = document.all.reftip;
  897.     if (tip) {
  898.         tip.style.visibility = "hidden";
  899.         tip.innerHTML = "";
  900.     }
  901. }
  902.  
  903.  
  904. function beginsWith(s1, s2){
  905.     // Does s1 begin with s2?
  906.     return s1.substring(0, s2.length) == s2;
  907. }
  908.  
  909.  
  910. // ****************************************************************************
  911. // *                           See Also popups                                *
  912. // ****************************************************************************
  913.  
  914. function initSeeAlso(){
  915.     var hdr = document.all.hdr;
  916.     if (!hdr)
  917.         return;
  918.  
  919.     var divS = new String;
  920.     var divR = new String;
  921.     var heads = document.all.tags("H4");
  922.     if (heads) {
  923.         for (var i = 0; i < heads.length; i++) {
  924.             var head = heads[i];
  925.             var txt = head.innerText;
  926.             if (beginsWith(txt, L_SeeAlso_TEXT) || beginsWith(txt, US_See_Also)) {
  927.                 divS += head.outerHTML;
  928.                 var next = getNext(head);
  929.                 while (next && !next.tagName.match(/^(H[1-4])|(DIV)$/)) {
  930.                     divS += next.outerHTML;
  931.                     next = getNext(next);
  932.                 }
  933.             }
  934.             else if (beginsWith(txt, L_Requirements_TEXT) || beginsWith(txt, US_Requirements) || beginsWith(txt, L_QuickInfo_TEXT) || beginsWith(txt, US_QuickInfo)) {
  935.                 divR += head.outerHTML;
  936.                 var next = getNext(head);
  937.                 var isValid = true;
  938.                 while (isValid){
  939.                     if (next && !next.tagName.match(/^(H[1-4])$/)){
  940.                         if (next.tagName == "DIV" && next.outerHTML.indexOf("tablediv")==-1)
  941.                                 isValid = false;
  942.                         if (isValid){
  943.                             divR += next.outerHTML;
  944.                             next = getNext(next);
  945.                         }
  946.                     }
  947.                     else
  948.                         isValid = false;
  949.                 }
  950.             }
  951.         }
  952.     }
  953.  
  954.     var pos = getNext(hdr.parentElement);
  955.     if (pos) {
  956.         if (divR != "") {
  957.             divR = '<DIV ID=rpop CLASS=sapop onkeypress=ieKey>' + divR + '</DIV>';
  958.             var td = hdr.insertCell(0);
  959.             if (td) {
  960.                 td.className = "button1";
  961.                 td.onclick = showRequirements;
  962.                 td.onkeyup = ieKey;
  963.                 td.onkeypress = showRequirements;
  964.                 td.innerHTML = '<IMG id=button1 SRC="' + baseUrl + 'Requirements1a.gif' + '" ALT="' + L_Requirements_TEXT + '" BORDER=0 TABINDEX=0>';
  965.                 if (advanced)
  966.                     try{nsbanner.insertAdjacentHTML('afterEnd', divR);}
  967.                     catch(e){try{scrbanner.insertAdjacentHTML('afterEnd', divR);}catch(e){}}
  968.                 else
  969.                     document.body.insertAdjacentHTML('beforeEnd', divR);
  970.             }
  971.         }
  972.         if (divS != "") {
  973.             divS = '<DIV ID=sapop CLASS=sapop onkeypress=ieKey>' + divS + '</DIV>';
  974.             var td = hdr.insertCell(0);
  975.             if (td) {
  976.                 td.className = "button1";
  977.                 td.onclick = showSeeAlso;
  978.                 td.onkeyup = ieKey;
  979.                 td.onkeypress = showSeeAlso;
  980.                 td.innerHTML = '<IMG id=button1 SRC="' + baseUrl + 'SeeAlso1a.gif' + '" ALT="' + L_SeeAlso_TEXT + '" BORDER=0 TABINDEX=0>';
  981.                 if (advanced)
  982.                     try{nsbanner.insertAdjacentHTML('afterEnd', divS);}
  983.                     catch(e){try{scrbanner.insertAdjacentHTML('afterEnd', divS);}catch(e){}}
  984.                 else
  985.                     document.body.insertAdjacentHTML('beforeEnd', divS);
  986.             }
  987.         }
  988.     }
  989. }
  990.  
  991. function resetButtons(){
  992.     //unclick buttons...
  993.     var btns = document.all.button1;
  994.     if (btns) {
  995.         if (btns.src!=null) btns.src=btns.src.replace("c.gif", "a.gif"); //if there is only one button.
  996.         for (var i = 0; i < btns.length; i++){
  997.             btns[i].src = btns[i].src.replace("c.gif", "a.gif");
  998.         }
  999.     }
  1000. }
  1001.  
  1002. function showSeeAlso(){
  1003.     bodyOnClick();
  1004.     var btn = window.event.srcElement
  1005.     if (btn.id=="button1"){
  1006.     btn.src = btn.src.replace("a.gif", "c.gif");}
  1007.  
  1008.     window.event.returnValue = false;
  1009.     window.event.cancelBubble = true;
  1010.  
  1011.     var div = document.all.sapop;
  1012.     var lnk = window.event.srcElement;
  1013.  
  1014.     if (div && lnk) {
  1015.         div.style.pixelTop = lnk.offsetTop + lnk.offsetHeight;
  1016.         div.style.visibility = "visible";
  1017.     }
  1018. }
  1019.  
  1020.  
  1021. function showRequirements(){
  1022.     bodyOnClick();
  1023.     var btn = window.event.srcElement
  1024.     if (btn.id=="button1"){
  1025.     btn.src = btn.src.replace("a.gif", "c.gif");}
  1026.  
  1027.     window.event.returnValue = false;
  1028.     window.event.cancelBubble = true;
  1029.  
  1030.     var div = document.all.rpop;
  1031.     var lnk = window.event.srcElement;
  1032.  
  1033.     if (div && lnk) {
  1034.         div.style.pixelTop = lnk.offsetTop + lnk.offsetHeight;
  1035.         div.style.visibility = "visible";
  1036.     }
  1037. }
  1038.  
  1039.  
  1040. function hideSeeAlso(){
  1041.     var div = document.all.sapop;
  1042.     if (div)
  1043.         div.style.visibility = "hidden";
  1044.  
  1045.     var div = document.all.rpop;
  1046.     if (div)
  1047.         div.style.visibility = "hidden";
  1048. }
  1049.  
  1050.  
  1051. // ****************************************************************************
  1052. // *                             Expand-Collapse                              *
  1053. // ****************************************************************************
  1054.  
  1055. function makeExpandable(title, level){
  1056.     if (title!="")document.write("<a href=\"\#\" onClick='callExpand()' id=\"ExPand\" Class=\"expandLink" + level + "\"><IMG CLASS=\"ExPand\" SRC=\"" + baseUrl + "coe.gif\" HEIGHT=9 WIDTH=9 ALT=\"" + L_ExColl_TEXT + "\" BORDER=0> " + title + "</a><BR><div CLASS=\"expandBody" + level + "\">");
  1057.     else document.write("<a href=\"\#\" id=\"ExPandAll\" onClick='callExpandAll()' Class=\"expandLink" + level + "\"><IMG CLASS=\"ExPandAll\" SRC=\"" + baseUrl + "coe.gif\" HEIGHT=9 WIDTH=9 ALT=\"" + L_ExColl_TEXT + "\" BORDER=0> " + L_ExpandAll_TEXT + "</A>");
  1058. }
  1059.  
  1060. function getImage(){
  1061.     for (var a = 0; a < 7; a++){
  1062.           if ((e.tagName != 'A') && (e.parentElement != null)){e = e.parentElement;}
  1063.         var elemImg = e;
  1064.         if(elemImg.tagName == 'A'){elemImg = e.all.tags('IMG')(0); break;}}
  1065. return elemImg;}
  1066.  
  1067. function callExpand(){
  1068. //DO EXPAND/COLLAPSE
  1069.     e = window.event.srcElement;
  1070.  
  1071.     //PREVENTS NAVIGATION ON HREF TAGS
  1072.     event.returnValue = false;
  1073.  
  1074.     //FIND THE EXPAND/COLLAPSE PORTION AND ASCERTAIN BLOCK VS NONE
  1075.     var theDiv = GrabtheExpandDiv(e);
  1076.         
  1077.     //THIS PART WRITES THE PROPER IMAGE BESIDE THE TEXT
  1078.     if (theDiv.style.display == 'block'){
  1079.         var theImg = getImage(e);
  1080.         theImg.src = baseUrl + "coe.gif";
  1081.         theDiv.style.display = "none";}
  1082.     else {
  1083.         var theImg = getImage(e);
  1084.         theImg.src = baseUrl + "coc.gif";
  1085.         theDiv.style.display = "block";}
  1086. return;}
  1087.  
  1088. function GrabtheExpandDiv(e){
  1089. //FIND AREA TO EXPAND/COLLAPSE
  1090.     var theExpandDiv;
  1091.     for (var a = 0; a < 7; a++){
  1092.         var theTag = e.sourceIndex + e.children.length + a;
  1093.         theExpandDiv= document.all(theTag);
  1094.          if (((theExpandDiv.tagName == 'DIV') && ((theExpandDiv.className.toLowerCase().indexOf("expandbody")!=-1))) || theTag == document.all.length){break;}}
  1095. return theExpandDiv;
  1096. }
  1097.  
  1098. function callExpandAll(){
  1099.     e = window.event.srcElement;
  1100.     //PREVENTS NAVIGATION ON HREF TAGS
  1101.     event.returnValue = false;
  1102.     if (e.tagName=="IMG") e = e.parentElement;
  1103.     //Expand or Collapse?
  1104.     if (e.innerHTML.indexOf(L_ExpandAll_TEXT) != -1){eOrC="block"}else{eOrC="none"}
  1105.     if (eOrC=="block"){
  1106.         e.innerHTML="<IMG CLASS='ExPand' SRC=\"" + baseUrl + "coc.gif\" HEIGHT='9' WIDTH='9' ALT='" + L_ExColl_TEXT + "' BORDER='0'> " + L_CollapseAll_TEXT;}
  1107.     else{
  1108.         e.innerHTML="<IMG CLASS='ExPand' SRC=\"" + baseUrl + "coe.gif\" HEIGHT='9' WIDTH='9' ALT='" + L_ExColl_TEXT + "' BORDER='0'> " + L_ExpandAll_TEXT;}
  1109.     for (var a = 0; a < document.all.length; a++){ 
  1110.         e=document.all[a];
  1111.  
  1112.         if (e.id.indexOf('ExPand') != -1){
  1113.  
  1114.             if (e.id.indexOf('ExPandAll') == -1){
  1115.  
  1116.             var theDiv = GrabtheExpandDiv(e);
  1117.             if (eOrC == 'none'){
  1118.                 theImg = getImage(e);
  1119.                 theImg.src = baseUrl + "coe.gif";
  1120.                 theDiv.style.display = eOrC;}
  1121.             else {
  1122.                 theImg = getImage(e);
  1123.                 theImg.src = baseUrl + "coc.gif";
  1124.                 theDiv.style.display = eOrC;}
  1125.             }
  1126.         }
  1127.     }
  1128. return;}
  1129.  
  1130.  
  1131. // ****************************************************************************
  1132. // *                            Graphic Animation                             *
  1133. // ****************************************************************************
  1134.  
  1135. /* function insertAnimation(name) {
  1136.     document.write("<input type=\"image\" src=\"" + baseUrl + "AnimButton1.gif\" onClick=\"changeToAnimate('" + name +".gif', '" + name + "');\" onMouseDown=\"src='" + baseUrl + "AnimButton2.gif';\" onMouseUp=\"src='" + baseUrl + "AnimButton1.gif';\"> " + L_Animation_Text + "<br><br><img name=\"" + name + "\" src=\"" + name + "1.gif\">");
  1137.     }
  1138.  
  1139.  
  1140. function changeToAnimate(imgSRC, imgName) {
  1141.     document[imgName].src = imgSRC;
  1142.     }
  1143.  
  1144.  
  1145. To Support New Animation code uncomment these and delete the others
  1146. */
  1147.  
  1148. function insertAnimation(name, number) {
  1149.     imgArray[number].src = name + ".gif";
  1150.     document.write("<input type=\"image\" src=\"" + baseUrl + "AnimButton1.gif\" onClick=\"changeToAnimate('" + name + "', " + number + ");\" onMouseDown=\"src='" + baseUrl + "AnimButton2.gif';\" onMouseUp=\"src='" + baseUrl + "AnimButton1.gif';\"> " + L_Animation_Text + "<br><br><img name=\"" + name + "\" src=\"" + name + "1.gif\">");
  1151.     }
  1152.  
  1153.  
  1154. function changeToAnimate(imgName, number) {
  1155.     document[imgName].src = imgArray[number].src;
  1156.     }
  1157.  
  1158.  
  1159.  
  1160. // ****************************************************************************
  1161. // *                           Nonscrolling region                            *
  1162. // ****************************************************************************
  1163.  
  1164. function resizeBan(){
  1165. //resizes nonscrolling banner
  1166.     if (document.body.clientWidth==0) return;
  1167.     var oBanner= document.all.item("nsbanner");
  1168.     var oText= document.all.item("nstext");
  1169.     if (oText == null) return;
  1170.     var oBannerrow1 = document.all.item("bannerrow1");
  1171.     var oTitleRow = document.all.item("titlerow");
  1172.     if (oBannerrow1 != null){
  1173.         var iScrollWidth = bodyID.scrollWidth;
  1174.         oBannerrow1.style.marginRight = 0 - iScrollWidth;
  1175.     }
  1176.     if (oTitleRow != null){
  1177.         oTitleRow.style.padding = "0px 10px 0px 22px; ";
  1178.     }
  1179.     if (oBanner != null){
  1180. //Uncomment the following 4 lines for slingshot
  1181. //        if (document.all.tags('iframe') !=null){
  1182. //        document.body.scroll = "yes"
  1183. //        return; 
  1184. //    }
  1185.         document.body.scroll = "no"
  1186.         oText.style.overflow= "auto";
  1187.          oBanner.style.width= document.body.offsetWidth-2;
  1188.         oText.style.paddingRight = "20px"; // Width issue code
  1189.         oText.style.width= document.body.offsetWidth-4;
  1190.         oText.style.top=0;  
  1191.         if (document.body.offsetHeight > oBanner.offsetHeight)
  1192.                 oText.style.height= document.body.offsetHeight - (oBanner.offsetHeight+4) 
  1193.         else oText.style.height=0
  1194.     }    
  1195.     try{nstext.setActive();} //allows scrolling from keyboard as soon as page is loaded. Only works in IE 5.5 and above.
  1196.     catch(e){}
  1197.     resetButtons();
  1198.  
  1199.  
  1200. function set_to_print(){
  1201. //breaks out of divs to print
  1202.  
  1203.     var i;
  1204.  
  1205.     if (window.text)document.all.text.style.height = "auto";
  1206.             
  1207.     for (i=0; i < document.all.length; i++){
  1208.         if (document.all[i].tagName == "BODY") {
  1209.             document.all[i].scroll = "yes";
  1210.             }
  1211.         if (document.all[i].id == "nsbanner") {
  1212.             document.all[i].style.margin = "0px 0px 0px 0px";
  1213.             }
  1214.         if (document.all[i].id == "nstext") {
  1215.             document.all[i].style.overflow = "visible";
  1216.             document.all[i].style.top = "5px";
  1217.             document.all[i].style.width = "100%";
  1218.             document.all[i].style.padding = "0px 10px 0px 30px";
  1219.             }
  1220.         if (document.all[i].tagName == "A") {
  1221.             document.all[i].outerHTML = "<A HREF=''>" + document.all[i].innerHTML + "</a>";
  1222.             }
  1223.         }
  1224. }
  1225.  
  1226.  
  1227. function reset_form(){
  1228. //returns to the div nonscrolling region after print
  1229.  
  1230.      document.location.reload();
  1231. }
  1232.  
  1233.  
  1234. // ****************************************************************************
  1235. // *                        Feedback & other footer links                     *
  1236. // ****************************************************************************
  1237.  
  1238. function writefeedbacklink(){
  1239.     //writes feedback link
  1240.     msdnid = arguments[0];
  1241.     contextid = arguments[1];
  1242.     topictitle = arguments[2];
  1243.     href = "http://beta.visualstudio.net/feedback.asp?feedback=doc&msdnid="+msdnid+"&contextid="+contextid+"&topictitle="+topictitle;
  1244.     document.writeln("<a href="+href+">"+L_FeedbackLink_TEXT+"</a>");
  1245. }
  1246.  
  1247.  
  1248. function writemessagelink(){
  1249.     //Writes jump to PSS web site redirector
  1250.     //code tbd
  1251.     //Use L_MessageLink_TEXT variable from Localization Variables located at top of script.
  1252.     msdnid = arguments[0];
  1253.     href = "http://www.microsoft.com/contentredirect.asp?prd=vs&pver=7.0&id="+msdnid;
  1254.     document.writeln("<a href="+href+">"+L_MessageLink_TEXT+"</a>");
  1255. }
  1256.  
  1257.  
  1258. function writemailtolink(){
  1259.     //writes feedback link
  1260.     emailalias = arguments[0];
  1261.     contextid = arguments[1];
  1262.     topictitle = arguments[2];
  1263.  
  1264.     href = "mailto:"+emailalias+"?subject=Feedback%20on%20topic%20-%20"+topictitle+",%20URL%20-%20"+contextid;
  1265.     document.writeln("<a href="+href+">"+L_MailToLink_TEXT+"</a>");
  1266. }
  1267.  
  1268.  
  1269. // ****************************************************************************
  1270. // *                       NavFailPage Parameter Insertion                    *
  1271. // ****************************************************************************
  1272.  
  1273. function navfailpageparam(){
  1274.     var address = location.href;
  1275.     var params = address.indexOf("#");
  1276.         if (params==-1)
  1277.             params = address.indexOf("?");
  1278.         if (params>-1)
  1279.             document.write(address.substring(params+1));
  1280. }
  1281.